package com.sunchen.asc.service.user.api;

import com.alibaba.fastjson.JSONObject;
import com.sunchen.asc.service.common.ResultResponse;
import com.sunchen.asc.service.user.dto.RoleDto;
import com.sunchen.asc.service.user.vo.RoleVo;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;

import java.util.List;

public interface RoleService {


    public ResultResponse creatAuthentication(String name, String title);

    public ResultResponse editAuthentication(Long id, String name, String title);

    public ResultResponse deleteAuthentication(Long id);

    public ResultResponse creatRole(RoleDto roleDto);

    public ResultResponse editRole(RoleDto roleDto);

    public ResultResponse deleteRole(Long id);

    public ResultResponse setStatus(Long id, int status);

    public JSONObject findTheOnlyNameCreat(String name);

    public JSONObject findTheOnlyNameModify(String name, Long id);

    public JSONObject findTheOnlyAuthNameCreat(String name);

    public JSONObject findTheOnlyAuthNameModify(String name, Long id);

    public ResultResponse getAuthentication();

    public Page<RoleVo> roleList(Pageable pageable,String name);

    public ResultResponse getRoleDetail(Long id);

    public ResultResponse addRoleUrl(Long id, List<Long> urlIds);

    public ResultResponse getRoles();

    public ResultResponse authList(Pageable pageable, String title);

    public ResultResponse urlList();

    public ResultResponse getRoleByUrl(Long id);

    public ResultResponse urlQuery(String title,Pageable pageable);

    ResultResponse resourceUpdate();
}
